package com.example.shardingspheredemo.model.db;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.example.shardingspheredemo.util.JsonUtil;
import lombok.Data;

@TableName("t_order")
@Data
public class OrderInfo {

    @TableId(value = "order_id")
    private Long orderId;

    @TableField(value = "order_name")
    private String orderName;

    @TableField(value = "order_status")
    private Integer orderStatus;

    @TableField(value = "user_id")
    private Long userId;

    public static void main(String[] args) {
        OrderInfo orderInfo = new OrderInfo();

        orderInfo.setOrderId(111L);
        orderInfo.setOrderStatus(0);
        orderInfo.setOrderName("订单1");
        orderInfo.setUserId(111L);

        System.out.println(JsonUtil.convertToJson(orderInfo));
    }

}